# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=pass-git-helper
pkgver=1.4.0
pkgrel=0
pkgdesc="git credential helper interfacing with pass, the standard unix password manager."
url="https://github.com/languitar/pass-git-helper"
arch="noarch"
license="LGPL-3.0-only"
depends="python3 py3-xdg"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-cov py3-pytest-mock"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/languitar/pass-git-helper/archive/v$pkgver.tar.gz"

provides="py3-pass-git-helper=$pkgver-r$pkgrel"
replaces="py3-pass-git-helper"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a4f16dd73bd2d4e2070691aa7cff98ca8ebb73d981401873c6aca4654f475958cf7a51c6f2bdb1f7f030ae41ddad28055d82dab3f6fe220ed467f68408fc6c77  pass-git-helper-1.4.0.tar.gz
"
